'use strict';
//1.建立数据库链接
const db = uniCloud.database();
//2.找到要插入的数据表
const user = db.collection('Accounts')
const userinfo = db.collection('UserInfo')
exports.main = async (event, context) => {
    //event为客户端上传的参数
    console.log('event :', event)
    //3.插入数据表
    let resust = await user.add(event)
	let userinforesust = await userinfo.add(event)
    console.log("add result" + JSON.stringify(resust));
	console.log("add userinforesult" + JSON.stringify(userinforesust));
    //返回数据给客户端
    return event
};